<template>
  <div v-loading="loading">
    <el-carousel trigger="click" height="180px">
      <el-carousel-item v-for="item in 3" :key="item">
        <el-image :src="'/bg/' + item + '.jpg'" fit="cover" style="height:100%;width:100%;"></el-image>
      </el-carousel-item>
    </el-carousel>
    <!-- <div style="margin-top:10px;text-align:right">
      <el-button
        type="primary"
        @click="getData"
      >刷新</el-button>
    </div>
    <el-row
      :gutter="20"
      style="margin-top:10px"
    >
      <el-col :span="24">
        <el-card class="box-card">
          <div style="font-size:24px">今日新增发票<span style="margin:0 10px;color:#F56C6C">{{summary.invoiceTotal}}</span>张，成功<span style="margin:0 10px;color:#F56C6C">{{summary.invoiceSuccess}}</span>张，失败<span style="margin:0 10px;color:#F56C6C">{{summary.invoiceFail}}</span>张</div>
        </el-card>
      </el-col>
      <el-col :span="24" style="margin-top:10px">
        <el-card class="box-card">
          <div style="font-size:24px">今日新增客户<span style="margin:0 10px;color:#F56C6C">{{summary.customerTotal}}</span>个，审批状态异常客户 <span
              style="margin:0 10px;color:#F56C6C;cursor:pointer;"
              @click="openExamineStatusExceptionListDialog"
            >{{summary.examineStatusExceptionCustomerTotal}}</span> 个，今日重复客户 <span
              style="margin:0 10px;color:#F56C6C;"
            >{{summary.customerRepeatTotal}}</span> 个，中文<span
              style="margin:0 10px;color:#F56C6C;"
            >{{summary.customerZhRepeatTotal}}</span> 个</div>
        </el-card>
      </el-col>
    </el-row>
    <examine-status-exception-list-dialog ref="examineStatusExceptionListDialog" /> -->
    <!-- <el-button @click="test">test</el-button> -->    
  </div>
</template>
<script setup>
import api from "@/api/home"
import { useRouter } from "vue-router";
import { ref, useTemplateRef } from "vue";
const loading = ref(false)

const router = useRouter();
const test = () => {
  router.push("/sys/user?a=b");
  console.log(this.$router);
}
const getData = () => {
  loading.value = true;
  api.getTodaySummary().then(res => {
    // this.summary = res.data;
    loading.value = false;
  })
}

const examineStatusExceptionListDialogRef = useTemplateRef("examineStatusExceptionListDialog")
const openExamineStatusExceptionListDialog = () => {
  examineStatusExceptionListDialogRef.open();
}

const data = ref([])
</script>